import "core-js/stable";
// import Cookies from "js-cookie";
import "regenerator-runtime/runtime";
import Vue from "vue";
import "@/assets/icons";
import App from "./App.vue";
import router from "./router";
import store from "./store";
// import '@/plugins/element.js'
import * as ElementUI from "element-ui";
import init from "@/assets/elerem/index";
import formCreate from "@form-create/element-ui";
import Util from "@/plugins/util.js"; //11
// import CustomerInfoManageServer from "@/api/customer/CustomerInfoManageServer";
import axios from "axios";
// import 'element-ui/lib/theme-chalk/index.css'
// import '@/styles/element-variables.scss'
import '@/assets/elerem/styles/element-ui.css'
import "@/styles/index.scss"; // global css

Vue.prototype.Axios = axios;
Vue.prototype.$bus = new Vue();
Vue.use(Util);
Vue.use(formCreate);
Vue.config.productionTip = false;

const app = new Vue({
	router,
	store,
	render: (h) => h(App),
}).$mount("#app");
init(Vue, {
	elementToRem: true,
	config: {
		pxToRem: 100,
	},
	use: [ElementUI], // 组件批量注册

	prototype: {
		// vue原型方法设置
	},
});
const { queryParse } = app.$util;
let query = queryParse(window.location.href);

app.$router.push({ path: `/${query.router}` });

// initMethods();
// // 初始化
// async function initMethods() {
// 	const response = await CustomerInfoManageServer.getLoginUserInfo();
// 	if (response.code == 200) {
// 		var res = response.meta;
// 		Cookies.set("cust-userinfo", res);
// 		sessionStorage.setItem("acctId", res.acctId);
// 		sessionStorage.setItem("departmentCode", res.departmentId);
// 		sessionStorage.setItem("departmentId", res.departmentId);
// 		sessionStorage.setItem("departmentName", res.departmentName);
// 		sessionStorage.setItem("ipAddress", res.ipAddress);
// 		sessionStorage.setItem("latnId", res.latnId);
// 		sessionStorage.setItem("mac", res.mac);
// 		sessionStorage.setItem("orgCode", res.orgCode);
// 		sessionStorage.setItem("orgId", res.orgId);
// 		sessionStorage.setItem("orgName", res.orgName);
// 		sessionStorage.setItem("orgType", res.orgType);
// 		sessionStorage.setItem("passwordDate", res.passwordDate);
// 		sessionStorage.setItem("privilegeCodes", res.privilegeCodes);
// 		sessionStorage.setItem("privilegeList", res.privilegeList);
// 		sessionStorage.setItem("regionCode", res.regionCode);
// 		sessionStorage.setItem("regionId", res.regionId);
// 		sessionStorage.setItem("regionType", res.regionType);
// 		sessionStorage.setItem("staffAcct", res.staffAcct);
// 		sessionStorage.setItem("staffCode", res.staffCode);
// 		sessionStorage.setItem("staffId", res.staffId);
// 		sessionStorage.setItem("staffName", res.staffName);
// 		sessionStorage.setItem("sysGuid", res.sysGuid);
// 		sessionStorage.setItem("systemUserId", res.systemUserId);
// 		sessionStorage.setItem("testUserFlag", res.testUserFlag);
// 	}
// }
// 
